<link href="../addons/jy_area_dian/resource/css/style.css" rel="stylesheet">
<style type="text/css">
	.icon1 {
		width: .8rem; height: .8rem;
		vertical-align: -0.15em;
		fill: currentColor;
		overflow: hidden;
	}
</style>
<div class="fui-page fui-page-current page-commission-index ">
	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back" ng-click='goback()'></a>
		</div>
		<div class="title">{{pagedata.setting.agent_center}}</div>
		<div class="fui-header-right"></div>
	</div>
    <div class='fui-content'>
	<div style="background: {{main.syscolor||'#05c175'}};padding:1rem 0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div class="bold">{{pagedata.member.title || pagedata.member.nickname}} </div>
					<div style="font-size:0.6rem">推荐网点 ：{{pagedata.team.title || '总部'}}</div>
					<div>
						<span style="font-size:0.7rem;margin-top:0.3rem;color:#f2f2f2">({{pagedata.member.levelname}})<i class='icon icon-question' style='font-size:8px;'></i></span>
					</div>
				</div>
				<div ng-if="pagedata.setting.myshop==1" class="fui-cellone-remark noremark" style="font-size:1rem;color:#fff;">
					<i href="javascript:;" ng-click="access_json('jy_commission/info/main')" class="icon icon-set"></i>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">{{pagedata.setting.commission_total}}</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.data.commission_total || '0.00'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">订单笔数</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.data.ordernum || 0}}</div>
														
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">网点客户</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.member.member_num || 0}}</div>
													</div>
					</div>
			</div>			
	</div>
	<div style="padding:0.5rem;margin-top:-2.5rem">
		<div class="fui-icon-group noborder radius col-4" style="background:#fff">
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.dayordernum || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">今日订单总数</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.dayorderfee || '0.00'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">今日销售额</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.ordernum || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">累计总订单数</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.orderfee || '0.00'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">累计总销售额</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.daytotal || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">今日单品销售量</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.alltotal || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">单品总销量</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.ordernum0 || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">未核销订单数</div>
					</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0">
					<div>
						<div class="text bold">{{pagedata.data.ordernum2 || '0'}}</div>
						<div class="subtitle" style="font-size:0.6rem;color: #666;">已核销订单数</div>
					</div>
				</div>
		</div>
		<div class="fui-cell-group radius">
			<div class="fui-cell"style="height: 2.85rem;">
				<div class="fui-cell-icon">
					<i class="icon jinyunicon icon-qrcode"></i>
				</div>
				<div class="fui-cell-text">我的网点码：{{pagedata.member.id}}
				</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;" ng-show="pagedata.setting.closed_qrcode!=1"  href="javascript:;" ng-click="access_json('jy_area_dian/qrcode/main')"></div>
			</div>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group">
							<a class="fui-cell external" href="javascript:;" ng-click="access_json('jy_area_dian/order/')">
								<div class="fui-cell-text bold">网点的订单</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">查看全部订单</div>
							</a>
							<div class="fui-icon-group col-4 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_area_dian/order//status=0')">
									<div class="badge" ng-if="pagedata.statics.status0>0">{{pagedata.statics.status0}}</div>
									<div class="icon icon-green radius"><i class="icon icon-ruzhuchenggongdapx"></i></div>
									<div class="text">待入网</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_area_dian/order//status=1')">
									<div class="badge" ng-if="pagedata.statics.status1>0">{{pagedata.statics.status1}}</div>
									<div class="icon icon-orange radius"><i class="icon icon-peisong"></i></div>
									<div class="text">待配送</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_area_dian/order//status=2')">
									<div class="badge" ng-if="pagedata.statics.status2>0">{{pagedata.statics.status2}}</div>
									<div class="icon icon-blue radius"><i class="icon icon-tianmaoanshidaohuo"></i></div>
									<div class="text">待自提</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_area_dian/order//status=2')">
									<div class="badge" ng-if="pagedata.statics.status2>0">{{pagedata.statics.status2}}</div>
									<div class="icon icon-blue radius"><i class="icon icon-jingshi"></i></div>
									<div class="text">异常报备</div>
								</a>
							</div>
							<div class="fui-cell external" href="javascript:;" ng-click="pagedata.scancode()">
								<div class="fui-cell-text bold">自提核销 <i class="icon jinyunicon icon-saoyisao1"></i></div>
								<div class="fui-cell-remark"> 点击扫码</div>
							</div>
		</div>
		<div class="userblock radius" style="background: #fff;">
			<div class="line total new radius">
				<div class="num">{{pagedata.data.balance_total || '0.00'}}</div>
				<div class="title">{{pagedata.setting.balance_total}}(元)</div>
			</div>
			<div class="line usable new radius">
				<div class="text">
					<div class="num">{{pagedata.data.commission_1  || '0.00'}}</div>
					<div class="title">{{pagedata.setting.commission_1}}(元)</div>
				</div>		
				<a ng-if="pagedata.data.commission_1 > 0" ng-click="post({},'commission/balance')" class="btn btn-warning external" ><span style="line-height: 1">{{pagedata.setting.balance_button}}</span></a>
			</div>
		</div>
		<div class="fui-block-group new col-2 radius" style='overflow: hidden;'>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/commission/main')">
                <div class="icon " style="color: #ff4357;"><i class="icon jinyunicon icon-caifua"></i></div>
                <div class="text new">
					<div class="title">{{pagedata.setting.commission_total}}</div>
                    <div class=""><span>{{pagedata.data.commission_total}}</span> 元</div>
				</div>
            </a>
            <a class="fui-block-child new external" href="javascript:;" ng-click="access_json('/feelog/')">
                <div class="icon" style="color: #9ec9f4;"><i class="icon jinyunicon icon-dingdan"></i></div>
				<div class="text new">
					<div class="title">分红明细</div>
					<div class=""><span>{{pagedata.data.commission_num}}</span> 笔</div>
				</div>
            </a>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/balance/main')">
                <div class="icon" style="color: #ffbe2e;"><i class="icon jinyunicon icon-wodeqianbao"></i></div>
				<div class="text new">
					<div class="title">结算</div>
					<div class=""><span>{{pagedata.data.balance_num}}</span> 笔</div>
				</div>
            </a>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/area/')">
                <div class="icon" style="color: #ffbe2e;"><i class="icon jinyunicon icon-wodeqianbao"></i></div>
				<div class="text new">
					<div class="title">代理区域</div>
					<div class=""><span>{{pagedata.data.area_num}}</span> 个</div>
				</div>
            </a>
		

		</div>
		<div class="fui-cell-group">
			<a class="fui-cell" ng-click="access_json('/area/')">
				<div class="fui-cell-icon ">
					<i class="icon jinyunicon icon-caifub text-yellow"></i>
				</div>
				<div class="fui-cell-text">我代理的地区</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;"></div>
			</a>
			
		</div>
	</div>
</div>

</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					location.href = result;
				}
			});
}
</script>